{$CLEO}
0000:
thread 'StIco'
    wait 0
    
    // 0xA0FD08 - sceen height
    05E0: 1@ = read_memory 0xA0FD08 size 4 virtual_protect 0
    
    // proportionality top margin's
    0087: 9@ = 1@
    9@ /= 100
    9@ *= 10
    0093: 9@ = int_to_float 9@
    
    // proportionality sprites size's    
    1@ /= 6
    1@ /= 1
    0093: 1@ = int_to_float 1@
    0087: 2@ = 1@
    
    /*// available only in CLEO 2.0.0.4
    0AF2: read_float_from_ini_file "cleo\radioStation.ini" section "IconsParams" key "size" store_to 10@

    if
        10@ > 0
    then
        0087: 1@ = 10@
        0087: 2@ = 10@
    end

    0AF2: read_float_from_ini_file "cleo\radioStation.ini" section "IconsParams" key "margin" store_to 10@

    if
        10@ > 0
    then
        0087: 9@ = 10@
    end   */
        
    3@ = 0                         // top margin value
    3@ -= 9999.0                   // because we can't write negative value in opcode
    
    // 0x6CD9C8 - top margin in pixels (float)
    05DF: write_memory 0x6CD9C8 size 4 value 3@ virtual_protect 0 // hide radiostations' names
    0006: 11@ = 0 // @ = int
    0006: 12@ = 0 // @ = int

    :checking
    wait 0 
    
    while 80E0: not player $PLAYER_CHAR driving 
        wait 0 
        0006: 11@ = 0 // @ = int
    end
    
    if
    0038:   $onmission == 1 // $ == int
    then 
        0006: 12@ = 1 // @ = int
    end
    
    if and
    0038:   $onmission == 0 // $ == int  
    0039:   12@ == 1 // @ == int 
    then 
        jump @refresh   
    end
    
    if
    0039:   11@ == 0 // @ == int   
    then 
    :refresh   
            0006: 12@ = 0 // @ = int
            0006: 11@ = 1 // @ = int     
            0390: load_txd_dictionary 'radio' 
            038F: load_texture 'wild' as  11 
            038F: load_texture 'flash' as 12 
            038F: load_texture 'kchat' as 13 
            038F: load_texture 'fever' as 14 
            038F: load_texture 'vrock' as 15 
            038F: load_texture 'vcpr' as  16
            038F: load_texture 'espan' as 17 
            038F: load_texture 'emoti' as 18 
            038F: load_texture 'wave' as  19  
            038F: load_texture 'player' as  20  
    end
    // 0xA0FD04 - screen width
    05E0: 0@ = read_memory 0xA0FD04 size 4 virtual_protect 0
    0014: 0@ /= 2 
    008D: 0@ = integer_to_float 0@ // coordinates is float always
    
    
    03F0: enable_text_draw 1
    03E3: set_texture_to_be_drawn_antialiased 1
    
    
    03C1: 4@ = player $PLAYER_CHAR car_no_save 
    05E7: 5@ = car 4@ struct
    5@ += 0x23C // corrent radiostation ID
    
    while true
        wait 0
        if or
            00DE: player $PLAYER_CHAR driving_vehicle_type #POLICE 
            00DE: player $PLAYER_CHAR driving_vehicle_type #RHINO 
            00DE: player $PLAYER_CHAR driving_vehicle_type #FBICAR 
            00DE: player $PLAYER_CHAR driving_vehicle_type #FIRETRUK 
            00DE: player $PLAYER_CHAR driving_vehicle_type #BARRACKS 
            00DE: player $PLAYER_CHAR driving_vehicle_type #ENFORCER 
            00DE: player $PLAYER_CHAR driving_vehicle_type #ENFORCER 
            00DE: player $PLAYER_CHAR driving_vehicle_type #VICECHEE
        then
            continue 
        else if
            00DE: player $PLAYER_CHAR driving_vehicle_type #AMBULAN
            then
                continue 
            else
                break
            end
        end
    end
    
    05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
   
    if
        6@ == 0
    then
        01BD: 7@ = current_time_in_ms
        while 6@ == 0
            wait 0
            038D: draw_texture 11 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
            05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
            01BD: 8@ = current_time_in_ms
            0062: 8@ -= 7@
            if
                8@ >= 2000
            then
                while 6@ == 0
                    wait 0
                    if
                        80E0:   not player $PLAYER_CHAR driving
                    then
                        jump @checking
                    end
                    05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                end
                jump @checking  
            end
        end
    else
        if
            6@ == 1
        then
            01BD: 7@ = current_time_in_ms            
            while 6@ == 1
                wait 0
                038D: draw_texture 12 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                          
                01BD: 8@ = current_time_in_ms
                0062: 8@ -= 7@
                if
                    8@ >= 2000
                then
                    while 6@ == 1
                        wait 0
                        if
                            80E0:   not player $PLAYER_CHAR driving
                        then
                            jump @checking
                        end
                        05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                    end
                    jump @checking  
                end
            end
        else
            if
                6@ == 2
            then
                01BD: 7@ = current_time_in_ms
                while 6@ == 2
                    wait 0
                    038D: draw_texture 13 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                    05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                        
                    01BD: 8@ = current_time_in_ms
                    0062: 8@ -= 7@
                    if
                        8@ >= 2000
                    then
                        while 6@ == 2
                            wait 0
                            if
                                80E0:   not player $PLAYER_CHAR driving
                            then
                                jump @checking
                            end
                            05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                        end
                        jump @checking  
                    end
                end
            else
                if
                    6@ == 3
                then
                    01BD: 7@ = current_time_in_ms
                    while 6@ == 3
                        wait 0
                        038D: draw_texture 14 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                        05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                        
                        01BD: 8@ = current_time_in_ms
                        0062: 8@ -= 7@
                        if
                            8@ >= 2000
                        then
                            while 6@ == 3
                                wait 0
                                if
                                    80E0:   not player $PLAYER_CHAR driving
                                then
                                    jump @checking
                                end
                                05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                            end
                            jump @checking  
                        end
                    end
                else
                    if
                        6@ == 4
                    then
                        01BD: 7@ = current_time_in_ms
                        while 6@ == 4
                            wait 0
                            038D: draw_texture 15 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                            05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                        
                            01BD: 8@ = current_time_in_ms
                            0062: 8@ -= 7@
                            if
                                8@ >= 2000
                            then
                                while 6@ == 4
                                    wait 0
                                    if
                                        80E0:   not player $PLAYER_CHAR driving
                                    then
                                        jump @checking
                                    end
                                    05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                                end
                                jump @checking  
                            end
                        end
                    else
                        if
                            6@ == 5
                        then
                            01BD: 7@ = current_time_in_ms
                            while 6@ == 5
                                wait 0
                                038D: draw_texture 16 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                                05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                       
                                01BD: 8@ = current_time_in_ms
                                0062: 8@ -= 7@
                                if
                                    8@ >= 2000
                                then
                                    while 6@ == 5
                                        wait 0
                                        if
                                            80E0:   not player $PLAYER_CHAR driving
                                        then
                                            jump @checking
                                        end
                                        05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                                    end
                                    jump @checking  
                                end
                            end
                        else
                            if
                                6@ == 6
                            then
                                01BD: 7@ = current_time_in_ms
                                while 6@ == 6
                                    wait 0
                                    038D: draw_texture 17 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                                    05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                        
                                    01BD: 8@ = current_time_in_ms
                                    0062: 8@ -= 7@
                                    if
                                        8@ >= 2000
                                    then
                                        while 6@ == 6
                                            wait 0
                                            if
                                                80E0:   not player $PLAYER_CHAR driving
                                            then
                                                jump @checking
                                            end
                                            05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                                        end
                                        jump @checking  
                                    end
                                end
                            else
                                if
                                    6@ == 7
                                then
                                    01BD: 7@ = current_time_in_ms
                                    while 6@ == 7
                                        wait 0
                                        038D: draw_texture 18 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                                        05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                       
                                        01BD: 8@ = current_time_in_ms
                                        0062: 8@ -= 7@
                                        if
                                            8@ >= 2000
                                        then
                                            while 6@ == 7
                                                wait 0
                                                if
                                                    80E0:   not player $PLAYER_CHAR driving
                                                then
                                                    jump @checking
                                                end
                                                05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                                            end
                                            jump @checking  
                                        end
                                    end
                                else
                                    if
                                        6@ == 8
                                    then
                                        01BD: 7@ = current_time_in_ms
                                        while 6@ == 8
                                            wait 0
                                            038D: draw_texture 19 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                                            05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                        
                                            01BD: 8@ = current_time_in_ms
                                            0062: 8@ -= 7@
                                            if
                                                8@ >= 2000
                                            then
                                                while 6@ == 8
                                                    wait 0
                                                    if
                                                        80E0:   not player $PLAYER_CHAR driving
                                                    then
                                                        jump @checking
                                                    end
                                                    05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                                                end
                                                jump @checking  
                                            end
                                        end
                                    else
                                        if
                                            6@ == 9
                                        then
                                            01BD: 7@ = current_time_in_ms
                                            while 6@ == 9
                                                wait 0
                                                038D: draw_texture 20 position 0@ 9@ scale 1@ 2@ RGBA 255 255 255 200
                                                05E0: 6@ = read_memory 5@ size 1 virtual_protect 0                                                                        
                                                01BD: 8@ = current_time_in_ms
                                                0062: 8@ -= 7@
                                                if
                                                    8@ >= 2000
                                                then
                                                    while 6@ == 9
                                                        wait 0
                                                        if
                                                            80E0:   not player $PLAYER_CHAR driving
                                                        then
                                                            jump @checking
                                                        end
                                                        05E0: 6@ = read_memory 5@ size 1 virtual_protect 0
                                                    end
                                                    jump @checking  
                                                end
                                            end
                                        end
                                    end
                                end
                            end
                        end                                               
                    end
                end
            end
        end 
    end
    jump @checking
end_thread